static int __init detect_init_APIC (void)
{
u32 h, l, features;
- extern void get_cpu_vendor(struct cpuinfo_x86*);
/* Disabled by kernel option? */
if (enable_local_apic < 0)
return -1;
/* Workaround for us being called before identify_cpu(). */
- get_cpu_vendor(&boot_cpu_data);
+ /*get_cpu_vendor(&boot_cpu_data); Not for Xen */
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_AMD:
extern unsigned long cpu0_stack[];
-struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1 };
+struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
#if defined(CONFIG_X86_64)
unsigned long mmu_cr4_features = X86_CR4_PSE | X86_CR4_PGE | X86_CR4_PAE;
{
int i;
+ early_cpu_init();
+
/* Unmap the first page of CPU0's stack. */
memguard_guard_stack(cpu0_stack);
GDT_VIRT_START(current) + FIRST_RESERVED_GDT_BYTE,
virt_to_phys(gdt_table) >> PAGE_SHIFT, 1, PAGE_HYPERVISOR);
- /* Process CPU type information. */
- early_cpu_init();
- identify_cpu(&boot_cpu_data);
- if ( cpu_has_fxsr )
- set_in_cr4(X86_CR4_OSFXSR);
- if ( cpu_has_xmm )
- set_in_cr4(X86_CR4_OSXMMEXCPT);
-
find_smp_config();
smp_alloc_memory();
scheduler_init();
+ identify_cpu(&boot_cpu_data);
+ if ( cpu_has_fxsr )
+ set_in_cr4(X86_CR4_OSFXSR);
+ if ( cpu_has_xmm )
+ set_in_cr4(X86_CR4_OSXMMEXCPT);
+
if ( opt_nosmp )
max_cpus = 0;
smp_prepare_cpus(max_cpus);